package com.cqx.collectionMysql.persistence.repository;

import com.cqx.collectionMysql.persistence.entity.ManufactureView;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;
import java.util.List;

/**
 * 权限持久层
 * @author ping.chen
 */
public interface ManufactureRepository extends JpaRepository<ManufactureView, String>, JpaSpecificationExecutor<ManufactureView> {

    @Query(value = "select * from manufacture_view1 where time >?1",nativeQuery =true)
    List<ManufactureView> findByTimeAfter(String time);

    @Query(value = "select * from manufacture_view1 where time >?1 and time <= ?2",nativeQuery =true)
    List<ManufactureView> findByTimeBetween(String startTime,String endTime);

}
